package com.client.feign;

import com.Emplyment.result.Result;
import com.Emplyment.vo.ResumeTemplateVo;
import com.client.service.ResumeTemplateService;
import com.itWaVel.feign.client.TemplateClient;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class Template{

    @Autowired
    private ResumeTemplateService resumeTemplateService;

    @Autowired
    private RedisTemplate redisTemplate;

    private static final String Template_HASH_KEY = "template:HASH:data";

    @GetMapping("/template/getResumeTemplate")
    public Result<List<ResumeTemplateVo>> getResumeTemplate() {
        log.info("获取简历模板");
        List<ResumeTemplateVo> resumeTemplate = resumeTemplateService.getResumeTemplate();
        log.info("简历模板为：{}",resumeTemplate.toString());
        return Result.success(resumeTemplate) ;
    }
}
